home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2001 January / PC-WELT 01-2001.ISO / software / linux / office / f0_021 / setup
Encoding:
Text File  |  2000-10-12  |  3.8 KB  |  140 lines

  1. #!/bin/sh
  2. #*************************************************************************
  3. #
  4. #   $RCSfile: setup.sh,v $
  5. #
  6. #   $Revision: 1.1.1.1 $
  7. #
  8. #   last change: $Author: hr $ $Date: 2000/09/18 16:50:57 $
  9. #
  10. #   The Contents of this file are made available subject to the terms of
  11. #   either of the following licenses
  12. #
  13. #          - GNU Lesser General Public License Version 2.1
  14. #          - Sun Industry Standards Source License Version 1.1
  15. #
  16. #   Sun Microsystems Inc., October, 2000
  17. #
  18. #   GNU Lesser General Public License Version 2.1
  19. #   =============================================
  20. #   Copyright 2000 by Sun Microsystems, Inc.
  21. #   901 San Antonio Road, Palo Alto, CA 94303, USA
  22. #
  23. #   This library is free software; you can redistribute it and/or
  24. #   modify it under the terms of the GNU Lesser General Public
  25. #   License version 2.1, as published by the Free Software Foundation.
  26. #
  27. #   This library is distributed in the hope that it will be useful,
  28. #   but WITHOUT ANY WARRANTY; without even the implied warranty of
  29. #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  30. #   Lesser General Public License for more details.
  31. #
  32. #   You should have received a copy of the GNU Lesser General Public
  33. #   License along with this library; if not, write to the Free Software
  34. #   Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  35. #   MA  02111-1307  USA
  36. #
  37. #
  38. #   Sun Industry Standards Source License Version 1.1
  39. #   =================================================
  40. #   The contents of this file are subject to the Sun Industry Standards
  41. #   Source License Version 1.1 (the "License"); You may not use this file
  42. #   except in compliance with the License. You may obtain a copy of the
  43. #   License at http://www.openoffice.org/license.html.
  44. #
  45. #   Software provided under this License is provided on an "AS IS" basis,
  46. #   WITHOUT WARRUNTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,
  47. #   WITHOUT LIMITATION, WARRUNTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
  48. #   MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
  49. #   See the License for the specific provisions governing your rights and
  50. #   obligations concerning the Software.
  51. #
  52. #   The Initial Developer of the Original Code is: Sun Microsystems, Inc..
  53. #
  54. #   Copyright: 2000 by Sun Microsystems, Inc.
  55. #
  56. #   All Rights Reserved.
  57. #
  58. #   Contributor(s): _______________________________________
  59. #
  60. #
  61. #
  62. #*************************************************************************
  63.  
  64. # resolve installation directory
  65. sd_platform=`uname -s`
  66. case $sd_platform in
  67.         SCO_SV) test=/bin/test     ;;
  68.         *)      test=/usr/bin/test ;;
  69. esac
  70.  
  71. sd_cwd="`pwd`"
  72. if $test -L "$0" ; then
  73.         sd_basename=`basename $0`
  74.         sd_script=`ls -l $0 | sed "s/.*${sd_basename} -> //g"`
  75. else
  76.         sd_script="$0"
  77. fi
  78.  
  79. cd "`dirname "$sd_script"`"
  80.  
  81. sd_archive_path=`pwd`
  82. sd_setup_binary=setup.bin
  83. sd_platform=`uname -s`
  84. sd_release=`uname -r`
  85.  
  86. if $test -L ./sopatchlevel.sh ; then
  87.     ./sopatchlevel.sh
  88. fi
  89.  
  90. if [ $? -eq 1 ]; then
  91.     exit 0;
  92. fi
  93.  
  94. # disable File Locking for NFS2 Linux Servers
  95. #STAR_PROFILE_LOCKING_DISABLED=1
  96. #export STAR_PROFILE_LOCKING_DISABLED
  97.  
  98. # some platforms may need an additional search path for X11 shared libraries
  99. case $sd_platform in
  100.   SunOS)
  101.      SAL_IGNOREXERRORS=1
  102.      export SAL_IGNOREXERRORS
  103.      LD_LIBRARY_PATH=.:..:/usr/openwin/lib
  104.      export LD_LIBRARY_PATH
  105.      ;;
  106.   Linux)
  107.      LD_LIBRARY_PATH=.:..:$LD_LIBRARY_PATH
  108.      export LD_LIBRARY_PATH
  109.      ;;
  110.       *)
  111.      ;;
  112. esac
  113.  
  114. case $sd_release in
  115.     5.5.1)
  116.         PATCH1=`showrev -p | grep 103640`
  117.         if [ "$PATCH1" != "" ]; then
  118.             PATCH1=INSTALLED
  119.         else
  120.             PATCH1=MISSING
  121.         fi
  122.         PATCH2=`showrev -p | grep 103566`
  123.         if [ "$PATCH2" != "" ]; then
  124.             PATCH2=INSTALLED
  125.         else
  126.             PATCH2=MISSING
  127.         fi
  128.  
  129.         THREAD_PATCH_NEEDED=TRUE
  130.         export PATCH1 PATCH2 THREAD_PATCH_NEEDED
  131.         ;;
  132.     *)
  133.         ;;
  134. esac
  135.  
  136. # execute setup binary
  137. chmod 755 "$sd_archive_path/$sd_setup_binary"
  138. exec "$sd_archive_path/$sd_setup_binary" $*
  139.  
  140.